package com.ncs.query;

/**
 * @author yinyin
 * @create 2021/07/17 下午 2:29
 */
public class ProductQuery {
    private  String productName;
    private  Double   minPrice;
    private  Double   maxPrice;

   /* public String getWhereSql(){
        String sql=" where 1=1 ";
        if (null!=productName || !"".equals(productName)){
           sql+=" and productName like'%"+productName+"%'";
        }
        if (null!=minPrice){
            sql+=" and salePrice>"+minPrice;
        }
        if (null!=maxPrice){
            sql+=" and salePrice<"+maxPrice;
        }
        System.out.println(sql);
        return sql;
    }*/

    private Integer currentPage;
    private Integer pageSize;

    public Integer getBeginIndex(){
        return (currentPage-1)*pageSize;
    }



    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Double getMinPrice() {
        return minPrice;
    }

    public void setMinPrice(Double minPrice) {
        this.minPrice = minPrice;
    }

    public Double getMaxPrice() {
        return maxPrice;
    }

    public void setMaxPrice(Double maxPrice) {
        this.maxPrice = maxPrice;
    }
}
